-
Notifications
You must be signed in to change notification settings - Fork 70
Switch configuration storage from .env to SQLite (breaking change) #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added Entity Framework Core packages to project. - Implemented ConfigDbContext for managing account overrides. - Created AccountOverrideEntity and corresponding DTO for data representation. - Developed SqliteAccountOverrideStore for data access and manipulation. - Introduced AccountOverrideMerger for applying overrides to account settings. - Updated ConfigController to handle account override retrieval and updates. - Enhanced Program.cs to configure the SQLite database context. - Added tests for account override functionality in ConfigController and AccountOverrideMerger. - Updated Dockerfile and docker-compose files to support SQLite data persistence.
- Introduced IAccountOverrideChangeNotifier and its implementation for notifying clients of account override changes. - Updated ConfigController to handle SSE for account override events and version retrieval. - Enhanced home-page and admin components to support real-time updates and management of account overrides. - Added functionality to refresh asset loading upon override changes.
- Introduced GeneralSettingsDto for managing general settings. - Implemented IGeneralSettingsStore and SqliteGeneralSettingsStore for data access. - Added GeneralSettingsChangeNotifier for real-time updates on general settings changes. - Enhanced ConfigController to handle retrieval and updates of general settings via API. - Updated Program.cs to initialize the GeneralSettings table in SQLite. - Integrated live updates in the home-page and admin components for general settings changes.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I just skipped through this PR; thank you for making it. Maybe I did not see it, but how would you protect the cc @3rob3 |
|
Thanks for the review and for calling this out - agreed that I had multiple points coming up when thinking about your valid questions. To get my thoughts across, I had the LLM summarize them below 😄 What “protect /admin” means todayImmichFrame currently has a single shared trust boundary:
So: protecting Minimal, low-complexity fix
This keeps complexity low while ensuring “non-admin viewers” can’t change config to expose albums/people they shouldn’t. Bigger picture: “real admins” vs multi-userI think your concern is correct: true per-user access control (each user only sees what they’re allowed to see) isn’t solvable purely by hiding ImmichFrame config. That’s a broader architecture topic:
That’s why I’m not convinced ImmichFrame should grow into a full multi-user management system. Once we go there, it may make more sense to push the “frame UI / slideshow capabilities” into Immich core, leveraging Immich’s existing user/session/permission model (this aligns with my earlier direction in immich-app/immich#24627). TL;DR
|
Summary
This PR replaces the current .env-based configuration with a SQLite-backed config store.
SQLite was chosen for simplicity, zero external dependencies, and to enable editing configuration while the container is running via the existing web interface at /admin.
Breaking change
This is an intentional breaking change:
The goal is to avoid dual config sources and long-term maintenance complexity.
Notes / limitations
Compatibility path
If this approach is considered too disruptive, the implementation can be refactored to:
That was intentionally deferred to keep this PR focused unless required.
Scope
This PR is limited to configuration storage changes only. No unrelated behavior or features are introduced.